@home.main("") {

    <div class="row">
        <div class="form-group col-sm-12">
            <h2 class="page-heading"
            style="text-align: left;
                border-bottom: 5px solid #e9f3f4">Message Board</h2>
        </div>
    </div>



    <form class="registration-form form-horizontal" id="conditionForm"
    style="margin: 20px;">

        <div class="form-group">
            <label class="control-label col-sm-2">Name:</label>
            <div class="col-sm-4">
                <input class="form-control" name="name" id="name">
            </div>
        </div>

        <div class="form-group">
            <label class="control-label col-sm-2">Telephone:</label>
            <div class="col-sm-4">
                <input class="form-control" name="telephone" id="telephone">
            </div>
        </div>

        <div class="form-group">
            <label class="control-label col-sm-2">E-mail:</label>
            <div class="col-sm-4">
                <input class="form-control" name="email" id="email">
            </div>
        </div>

        <div class="form-group" id="queryContent">
            <label class="control-label col-sm-2">Message:</label>
            <div class="col-sm-6">
                <textarea class="form-control" name="message" id="message" rows="5"
                style="font-family: 'Courier New', Menlo, Monaco, Consolas, monospace;
                    font-size: 16px"></textarea>
            </div>
        </div>


        <div class="form-group">
            <div class="actions col-sm-offset-2 col-sm-3">
                <button type="button" class="btn btn-primary" style="width: 80%;
                    margin-top: 5px" id="search" onclick="upload()">
                    Execute</button>
            </div>
            <div class="actions  col-sm-3" style="text-align: right">
                <button type="button" class="btn btn-primary" id="reset" style="width: 80%;
                    margin-top: 5px">
                    Reset</button>
                <button type="reset" style="display: none" id="r"></button>
            </div>
        </div>

    </form>

    <script>

        function upload() {
            $.ajax({
                url:"@routes.MessageController.insertMessage()",
                type:"post",
                dataType:"json",
                data: $("#conditionForm").serialize(),
                success: function (data) {
                    if(data == "success"){
                        cpm("success!")
                    }
                }
            })
        }



        $('#reset').click(function () {
            $('#r').click();
            $("#conditionForm").formValidation("revalidateField", "name");
            $("#conditionForm").formValidation("revalidateField", "telephone");
            $("#conditionForm").formValidation("revalidateField", "email");
            $("#conditionForm").formValidation("revalidateField", "message");

        });

    </script>


}


